"""
URL configuration for myproject project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/5.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""


''' demo 子路由'''

from django.urls import path

import blog.demo_views as views


urlpatterns = [
    # path('admin/', admin.site.urls),
    # path('hello/',views.hello),

    ########## demo样例 ############
    path('to_list/', views.to_list, name='to_list'),
    path('user/to_user/', views.to_user_list, name='to_user_list'),
    path('user/list/', views.UserList.as_view(), name='user_list'),
    path('user/modify/', views.UserModify.as_view(), name='user_modify'),
    path('user/add/', views.UserAdd.as_view(), name='user_add'),
    path('user/delete/', views.UserDelete.as_view(), name='user_delete'),
    path('user/batch_delete/', views.UserBatchDelete.as_view(), name='user_batch_delete'),
    #用户角色树
    path('user/role_tree/', views.UserRoleSelectTree.as_view(), name='user_select_tree'),
    path('user/role_update/', views.UserRoleUpdate.as_view(), name='user_role_update'),

    #menu_tree
    path('menu/to_menu/', views.to_menu_tree, name='to_menu'),
    path('menu/list/', views.MenuList.as_view(), name='menu_tree_data'),
    #菜单模块树
    path('menu/select_tree/', views.MenuSelectTree.as_view(), name='select_tree'),
    path('menu/update/', views.MenuUpdate.as_view(), name='menu_update'),
    path('menu/add/', views.MenuAdd.as_view(), name='menu_add'),
    path('menu/delete/', views.MenuDelete.as_view(), name='menu_delete'),
    ############### 角色 ############
    path('role/to_role/', views.to_role, name='to_role'),
    path('role/list/', views.RoleList.as_view(), name='role_list'),
    path('role/add/', views.RoleAdd.as_view(), name='role_add'),
    path('role/update/', views.RoleModify.as_view(), name='role_modify'),
    path('role/delete/', views.RoleDelete.as_view(), name='role_delete'),
    #查询角色授权菜单树
    path('role/select_tree/', views.RoleSelectTree.as_view(), name='role_select_tree'),
    # #角色授权菜单更新
    path('menu/user_menu_tree/', views.UserMenuTree.as_view(), name='user_menu_tree'),



]